<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>意见回复 - Powered By Betou</title>
<meta name="author" content="Betou Team" />
<meta name="copyright" content="Betou" />
<#include "../head.html"/>
<#if readOnly==false >
<script type="text/javascript">var _BASE="${base}/";</script>
<link href="${base}/thirdparty/swfupload2_5/swf.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/thirdparty/swfupload2_5/swfupload.js" charset="utf-8"></script>
<script type="text/javascript" src="${base}/thirdparty/swfupload2_5/fileprogress.js" charset="utf-8"></script>
<script type="text/javascript" src="${base}/thirdparty/swfupload2_5/handlers_logo.js" charset="utf-8"></script>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	
	// 表单验证
	$inputForm.validate({
		rules: {
			status: "required",
			content:{ required:true,	minlength:4, maxlength:1000	}
		}
	});

});
function addImage(p, src, id) {
	var inputForm = $('#inputForm');
	var hiddenInput = document.createElement('input');
	hiddenInput.type='hidden';
	hiddenInput.name="filepath";
	hiddenInput.value=src;
	inputForm.append( hiddenInput );
}
</script>
</#if>
<style type="text/css">
table.input th{
	vertical-align: top;
	width:20%;
}
.leftTh{
	text-align: left;
	padding-left: 10px;
}
.bigFont{
	font-weight: bold;
	font-size: larger;
}
</style>
</head>
<body class="content">
	<div class="path">
		<a href="../index.jspx">首页</a> &raquo; 意见回复&raquo; ${bean.title!}
	</div>
	<form id="inputForm" action="o_answer.jspx" method="post" >
		<input type="hidden" name="id" value="${bean.id!}"/>
		<table class="input tabContent">
			<tr>
				<th rowspan="4" >
					<div class="leftTh">
					提交人：<b>${(bean.admin.username)!}</b><br/>
					IP：${(bean.addIp)!}<br/>
					邮箱：${(bean.email)!}<br/>
					手机：${(bean.mobile)!}
					</div>
				</th>
				<td colspan="3"><span class="bigFont">${(bean.title)!?html}</span></td>
			</tr>
			<tr>
				<td>${(bean.addDate)?string('yyyy-MM-dd hh:mm:ss')}</td>
				<td>状态：<b>${(bean.statusName)!}</b></td>
				<td>类型：${(bean.type.name)!}</td>
			</tr>
			<tr>
				<td colspan="3">${(bean.content)!?html}</td>
			</tr>
			<tr>
				<td colspan="3">
					<table border="0" cellpadding="0" cellspacing="0"><tr>
					<td style="border: none 0px; vertical-align: top;padding: 0px">附件：</td>
					<td style="border: none 0px; padding: 0px""><#if bean.filePath1 ?? ><a href="${base}/${(bean.filePath1)!?html}">${base}/${(bean.filePath1)!?html}</a><br/></#if>
					<#if bean.filePath2 ?? ><a href="${base}/${(bean.filePath2)!?html}">${base}/${(bean.filePath2)!?html}</a><br/></#if>
					<#if bean.filePath3 ?? ><a href="${base}/${(bean.filePath3)!?html}">${base}/${(bean.filePath3)!?html}</a></#if>
					</td>
					</tr></table>
				</td>
			</tr>
			<#if answerList?? && answerList?size gt 0 >
			<tr><td colspan="4"><div class="bigFont">共${answerList?size}条回复</div>
				
				<#list answerList as answer >
				<div class="leftTh">
				<b>${(answer.admin.username)!}</b>&nbsp;|&nbsp;${(answer.addIp)!}&nbsp;|&nbsp;${(answer.addDate)?string('yyyy-MM-dd hh:mm:ss')}
				</div>
				<div><span style="color:#ababab">回复：</span>${(answer.content)!?html}</div>
					<#if answer.filePath1 ?? || answer.filePath2 ?? || answer.filePath3 ?? >
				<table border="0" cellpadding="0" cellspacing="0"><tr>
				<td style="border: none 0px; vertical-align: top;padding: 0px"><span style="color:#ababab">附件：</span></td>
				<td style="border: none 0px; padding: 0px""><#if answer.filePath1 ?? ><a href="${base}/${(answer.filePath1)!?html}">${base}/${(answer.filePath1)!?html}</a><br/></#if>
				<#if answer.filePath2 ?? ><a href="${base}/${(answer.filePath2)!?html}">${base}/${(answer.filePath2)!?html}</a><br/></#if>
				<#if answer.filePath3 ?? ><a href="${base}/${(answer.filePath3)!?html}">${base}/${(answer.filePath3)!?html}</a></#if>
				</td>
				</tr></table>
					</#if>
					<#if answer_has_next >
				<div style="border-top: 1px dashed;" />
					</#if>
				</#list>
			</td></tr>
			</#if>
			<#if readOnly==false >
			<tr>
				<td colspan="4"><span class="bigFont" >意见反馈</span><a id="answer">&nbsp;</a></td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>状态:</th>
				<td colspan="3">
					<#if statusType ??>
						<#list statusType as c>
					<input id="newStatus${c.key!}" name="status" value="${c.key!}" type="radio" /><label for="newStatus${c.key!}" >${c.value!}</label>&nbsp;
						</#list>
					</#if>
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>反馈内容:</th>
				<td colspan="3">
					<textarea class="text" name="content" title="内容最多1000字" ></textarea>
				</td>
			</tr>
			<tr>
				<th>附件上传：<br/>(最多3个)&nbsp;&nbsp;</th>
				<td colspan="3">
					<div class="fieldset flash" id="fsUploadProgress" style="display: inherit">
						<span id="uplimit" class="legend"></span>
					</div>
					<div>
					<input type="button" id="uploadBtn" value="选择文件" style="display: inherit"/>
					</div>
				</td>
			</tr>
			</#if>
			<tr>
				<th>
					&nbsp;
				</th>
				<td colspan="3">
					<#if readOnly==false ><input type="submit" class="button" value="确&nbsp;&nbsp;定" /></#if>
					<input type="button" class="button" value="返&nbsp;&nbsp;回" onclick="location.href='v_list.jspx'" />
				</td>
			</tr>
		</table>
	</form>
	<#include "../footer.html"/>
</body>
</html>
<#if readOnly==false >
<script type='text/javascript'>
var swfu;
var jsessionid = getCookie("JSESSIONID");
var uploadUrl='/all_upload.jhtml';
if(jsessionid) {
	uploadUrl += ";jsessionid="+jsessionid;
}

var settings = {
	post_params: {"directory": "upload/answer"},
	flash_url:"${base}/thirdparty/swfupload2_5/swfupload.swf", 
	flash9_url:"${base}/thirdparty/swfupload2_5/swfupload_fp9.swf", 
	upload_url: uploadUrl,  
	file_size_limit:"10MB", 
	file_types:"*.txt;*.doc;*.docx;*.xls;*.xlsx;*.jpg;*.png;*.gif;*.jpeg;*.zip;*.rar", 
	file_types_description:"文本,WORD,图片,压缩包", 
	file_upload_limit:3, 
	file_queue_limit:3, 
	custom_settings:{progressTarget:"fsUploadProgress", cancelButtonId:"btnCancel"}, 
	button_image_url:"${base}/thirdparty/swfupload2_5/choose_file.jpg", 
	button_placeholder_id:"uploadBtn", 
	button_width:175, 
	button_height:52, 
	button_text_top_padding:0, 
	button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT, 
	button_cursor:SWFUpload.CURSOR.HAND, 
	swfupload_preload_handler:preLoad, 
	swfupload_load_failed_handler:loadFailed, 
	file_queued_handler:fileQueued, 
	file_queue_error_handler:fileQueueError, 
	upload_start_handler:uploadStart, 
	upload_progress_handler:uploadProgress, 
	upload_error_handler:uploadError, 
	upload_success_handler:uploadSuccess, 
	upload_complete_handler:uploadComplete
};

swfu = new SWFUpload(settings);
$(document).ready(function(){
	if( !swfu.support.loading ){
		$('#fsUploadProgress').html('您当前的Flash Player版本过低,无法支持头像上传,点击<a href="http://get.adobe.com/cn/flashplayer/otherversions/" target="_blank">下载</a>');
	}
})
</script>
</#if>